        // disabling dates
 	$(function(){
 	    var nowTemp = new Date();
      var now = new Date(nowTemp.getFullYear(), nowTemp.getMonth(), nowTemp.getDate(), 0, 0, 0, 0);
			var startDate = now;
    	var endDate = now;
  		
      var datepickerFrom = $('#start_date').datepicker({
          format: 'dd-mm-yyyy',
          language: 'es',
          weekStart: 1,
        	onRender: function(date) {
						//return date.valueOf() < now.valueOf() ? 'disabled' : '';
					}
				}).on('changeDate', function(ev) {
          startDate = new Date(ev.date);
          if(endDate.valueOf() < startDate.valueOf()){
          	datepickerTo.setValue(startDate);
          }
          
          datepickerFrom.hide();
          datepickerTo.update();
          $('#end_date')[0].focus();
        }).data('datepicker');
        
      var datepickerTo = $('#end_date').datepicker({
          format: 'dd-mm-yyyy',
          language: 'es',
          weekStart: 1,
        	onRender: function(date) {
						return date.valueOf() < startDate.valueOf() ? 'disabled' : '';
					}
				}).on('changeDate', function(ev) {
          endDate = new Date(ev.date);
          datepickerTo.hide();
        }).data('datepicker');
	});
	